package listdemo;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * 演示
 */
public class Demo01 {
    public static void main(String[] args) {
        List<String> strings = new ArrayList<>();

        boolean add = strings.add("001");
        strings.add("002");
        strings.add(1,"003");
        strings.add(3,"003");
        String set = strings.set(2, "004");
        String remove = strings.remove(3);
        System.out.println(set);
        System.out.println(remove);


        System.out.println("---------------------");

        for (String s: strings) {
            System.out.println(s);
        }

    }
}
